home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / pixie.z / pixie
Text File  |  1998-10-30  |  18KB  |  397 lines

  1.  
  2.  
  3.  
  4. PPPPIIIIXXXXIIIIEEEE((((1111))))                                                              PPPPIIIIXXXXIIIIEEEE((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      pixie - add profiling code to an executable file
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ppppiiiixxxxiiiieeee file [ options ]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _p_i_x_i_e is an object instrumentation tool that can be used to measure code
  16.      execution frequency in a program for performance analysis.  _p_i_x_i_e reads
  17.      an executable program, partitions it into basic blocks, and writes an
  18.      equivalent program containing additional code that counts the execution
  19.      of each basic block. (A basic block is a region of the program that can
  20.      be entered only at the beginning and exited only at the end).
  21.  
  22.      Other options allow producing an uninstrumented copy of the executable,
  23.      with map and graph sections added, and producing an instrumented
  24.      executable for just counting function calls (arcs).
  25.  
  26.      _p_i_x_i_e is normally invoked from the SpeedShop _s_s_r_u_n(1) command; when it is
  27.      so invoked, the SpeedShop runtime will be inserted into the program, and,
  28.      when the program is run, it will generate a SpeedShop experiment file
  29.      with the appropriate count data.  Data will be generated if the process
  30.      exits normally, or received a fatal signal, unless the user has installed
  31.      his or her own handler for that signal.  If the process invokes any of
  32.      the various _d_l_o_p_e_n() calls, the DSO requested will be automatically
  33.      instrumented, and the instrumented version added to the process.
  34.  
  35.      _p_r_o_f(1) can analyze these files and produce a listing of profiling data.
  36.      See its man pages for more details.
  37.  
  38.      _e_l_f_d_u_m_p(1) can be used to dump out the contents of the various sections
  39.      added to an executable by _p_i_x_i_e.
  40.  
  41.      _p_i_x_i_e(1) adds its runtime _D_S_O(5) to the liblist of the executable.  The
  42.      normal rules _r_l_d(1) uses for LD_LIBRARY_PATH, _RLD_ROOT, and their abi
  43.      variants apply to locating the _p_i_x_i_e runtime dso _l_i_b_p_i_x_r_t._s_o.
  44.  
  45. DDDDIIIIRRRREEEECCCCTTTT IIIINNNNVVVVOOOOCCCCAAAATTTTIIIIOOOONNNN OOOOFFFF PPPPIIIIXXXXIIIIEEEE
  46.      _p_i_x_i_e may also be directly invoked by a user, in which case the SpeedShop
  47.      runtime is not inserted. When the instrumented program is run, it will
  48.      generate a file containing the basic block counts.  The pixified
  49.      executable will creat a counts file in the event of fatal signals as long
  50.      as the executable does not override the signal handlers set up by the
  51.      _p_i_x_i_e(1) runtime.
  52.  
  53.      The name of the output .Counts file is that of the original program with
  54.      any leading directory names removed and ".Counts" appended.  If the
  55.      program during runtime executes calls to _s_p_r_o_c(_2) , _s_p_r_o_c_s_p_c(_2) or
  56.      _f_o_r_k(_2) then multiple ".Counts" files will be generated, one for each
  57.      process in the share group.  In this case, each ".Counts" file will
  58.      additionally have the process id appended to the name.  If the process
  59.      invokes any of the various _d_l_o_p_e_n() calls, the DSO requested will NOT be
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. PPPPIIIIXXXXIIIIEEEE((((1111))))                                                              PPPPIIIIXXXXIIIIEEEE((((1111))))
  71.  
  72.  
  73.  
  74.      automatically instrumented; it is the user's responsibility to pre-
  75.      instrument all such DSOs.  When instrumenting DSO's it is necessary to
  76.      use one of the following switches: ----ddddssssoooo, ----ddddssssoooo33332222, ----ddddssssoooo66664444, depending on
  77.      whether the DSO is o32, n32, or n64 respectively.
  78.  
  79.      _p_r_o_f(1) can analyze these .Counts files and produce a listing of
  80.      profiling data.  If the ".Counts" file has a process id number appended
  81.      to it, you will need to give prof the full name including the suffix. See
  82.      the prof man pages for more details.
  83.  
  84. OOOOPPPPTTTTIIIIOOOONNNNSSSS
  85.      _p_i_x_i_e is normally invoked by the _s_s_r_u_n(1) command, and not directly
  86.      invoked by a user.  It recognizes the following arguments:
  87.  
  88.      ----ccccooooppppyyyy
  89.           Produce a copy of the target with function list (map) and arc list
  90.           (graph) sections, but no instrumentation.
  91.  
  92.      ----ffffccccnnnnccccoooouuuunnnnttttssss
  93.           Produce an instrumented executable that counts function calls and
  94.           arc calls, but not basic-block- or branch-counts.
  95.  
  96.      ----aaaaddddddddlllliiiibbbbssss _l_i_b_1._s_o:_l_i_b_2._s_o:..._l_i_b_N._s_o
  97.           Specify one or more DSOs that should be add to the library list of
  98.           the executable (if they are not already explicitly there).
  99.           Default: no libraries are added.
  100.  
  101.      ----ppppiiiixxxxiiiieeee____ffffiiiilllleeee <_n_a_m_e>
  102.           Specify the name of the pixiefied executable.
  103.           Default: append ".pixie" (or an explicit suffix, as set by ----ssssuuuuffffffffiiiixxxx)
  104.           to the original name.
  105.  
  106.      ----ccccoooouuuunnnnttttssss____ffffiiiilllleeee <_n_a_m_e>
  107.           Specify the name to be used for the output .Counts file.
  108.           Default: append ".Counts" to the original program name.
  109.  
  110.      ----ssssuuuuffffffffiiiixxxx <._s_u_f_f_i_x>
  111.           Specify the suffix to be appended to the pixified executable and
  112.           DSO.
  113.           Default: For an a.out, append ".pixie" (although _s_s_r_u_n(1) always
  114.           explicitly sets the suffix).  For DSOs, the default suffix depends
  115.           on the build architecture of the DSO; for o32 it is ".pix32", for
  116.           n32, it is ".pixn32", and for n64 it is ".pix64".
  117.  
  118.      ----ddddssssoooo
  119.           Treat executable as a o32 DSO.
  120.           Performs a search of standard o32 library directories (and
  121.           LD_LIBRARY_PATH), and causes a "._p_i_x_3_2" extension to be used.
  122.  
  123.      ----ddddssssoooo33332222
  124.           Treat executable as a n32 DSO.
  125.           Performs a search of standard n32 library directories (and
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. PPPPIIIIXXXXIIIIEEEE((((1111))))                                                              PPPPIIIIXXXXIIIIEEEE((((1111))))
  137.  
  138.  
  139.  
  140.           LD_LIBRARYN32_PATH), and causes a "._p_i_x_n_3_2" extension to be used.
  141.  
  142.      ----ddddssssoooo66664444
  143.           Treat executable as a n64 DSO.
  144.           Performs a search of standard n64 library directories (and
  145.           LD_LIBRARY64_PATH), and causes a "._p_i_x_6_4" extension to be used.
  146.  
  147.      ----ddddiiiirrrreeeeccccttttoooorrrryyyy _d_i_r_e_c_t_o_r_y__n_a_m_e
  148.           Specify a directory for writing the output file(s).
  149.           Default:  Current directory, "./".
  150.  
  151.      ----[[[[nnnnoooo]]]]aaaauuuuttttooooppppiiiixxxxiiiieeee
  152.           [Prevents] or permits a recursive instrumenting with pixie of all
  153.           dynamic shared libraries used by the input file during runtime.
  154.           _p_i_x_i_e keeps the timestamp and checksum from the original executable.
  155.           Before automatically instrumenting a shared library _p_i_x_i_e will check
  156.           any <lib>.pixie that it finds matching the <lib> it is to instrument
  157.           and sees if the fields match. If so they will not be re-
  158.           instrumented.  This option is not useful if the input file is non-
  159.           shared.  All DSO's used by the executable must to be instrumented in
  160.           order for it to work correctly.
  161.           Default:  ----aaaauuuuttttooooppppiiiixxxxiiiieeee for an executable; ----nnnnooooaaaauuuuttttooooppppiiiixxxxiiiieeee for a DSO.
  162.  
  163.      ----[[[[nnnnoooo]]]]vvvveeeerrrrbbbboooosssseeee
  164.           [Prevents] or permits messages summarizing the binary-to-binary
  165.           translation process.
  166.           Default:  ----nnnnoooovvvveeeerrrrbbbboooosssseeee
  167.  
  168.      ----[[[[nnnnoooo]]]]lllloooonnnnggggbbbbrrrraaaannnncccchhhh
  169.           When _p_i_x_i_e instruments the user program, some transformations can
  170.           push a branch offset beyond its legal range and _p_i_x_i_e will generate
  171.           warnings about branch offsets being out of range.  The -longbranch
  172.           option will cause _p_i_x_i_e to transform these instructions into jumps.
  173.           Default:  ----nnnnoooolllloooonnnnggggbbbbrrrraaaannnncccchhhh
  174.  
  175.      ----[[[[nnnnoooo]]]]ppppiiiiddddssss
  176.           This option tells _p_i_x_i_e to append the process id number on the end
  177.           of the ``.Counts'' name. This is useful if you want to run the
  178.           program instrumented with _p_i_x_i_e through a variety of tests before
  179.           generating the statistics with _p_r_o_f.  This option is only needed for
  180.           the main program. It will be transferred automatically to the
  181.           instrumented DSO's during runtime.  The -nopids options will always
  182.           be overridden by a process that issues a _f_o_r_k(2) or _s_p_r_o_c(2) system
  183.           call.
  184.           Default:  ----nnnnooooppppiiiiddddssss
  185.  
  186.      The following options are currently supported for compatibility reasons,
  187.      but are considered obsolescent, and will eventually be removed.  If you
  188.      feel they are necessary for your work, please contact us.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. PPPPIIIIXXXXIIIIEEEE((((1111))))                                                              PPPPIIIIXXXXIIIIEEEE((((1111))))
  203.  
  204.  
  205.  
  206.      ----[[[[nnnnoooo]]]]lllliiiibbbblllliiiisssstttt
  207.           [Prevents] or permits printing the names and paths of dynamic shared
  208.           libraries used by the input file during runtime. This uses the same
  209.           default search path strategy used by _r_l_d and _p_r_o_f.  This list is
  210.           useful for building a dependency list for makefiles and shell
  211.           scripts. The name of the file is that of the original program with
  212.           any leading directory names removed and ".liblist" appended.  While
  213.           pixie can not detect and pre-instrument any DSOs that the program
  214.           dynamically opens, the SpeedShop runtime does detect them, and will
  215.           cause them to be instrumented before proceeding with the _d_l_o_p_e_n.
  216.           Default:  ----nnnnoooolllliiiibbbblllliiiisssstttt
  217.  
  218.      ----[[[[nnnnoooo]]]]lllliiiibbbblllliiiissssttttoooonnnnllllyyyy
  219.           [Prevents] or permits printing the names and paths of dynamic shared
  220.           libraries used by the input file during runtime. This is the same as
  221.           -_l_i_b_l_i_s_t except that in this case no other operations are performed.
  222.           Default:  ----nnnnoooolllliiiibbbblllliiiissssttttoooonnnnllllyyyy
  223.  
  224.      ----[[[[nnnnoooo]]]]bbbbrrrraaaannnncccchhhhccccoooouuuunnnnttttssss
  225.           [Prevents] or permits insertion of extra counters to track whether
  226.           each branch instruction is taken or not taken.  When this option is
  227.           used, _p_r_o_f understands the new information automatically and prints
  228.           more statistics.
  229.           The information produced:
  230.                   branch to branch taken
  231.                   branch to branch untaken
  232.                   untaken conditional branches
  233.                   taken conditional branches
  234.                   taken conditional branches with bnop
  235.                   untaken conditional branches with bnop
  236.                   direction-predicted conditional branches with bnop
  237.                   non-sequential fetches
  238.                   taken branches per conditional branch
  239.                   forward taken branches per conditional branch
  240.                   forward untaken branches per conditional branch
  241.                   backward taken branches per conditional branch
  242.                   backward untaken branches per conditional branch
  243.           Default: ----bbbbrrrraaaannnncccchhhhccccoooouuuunnnnttttssss.
  244.  
  245.      ----[[[[nnnnoooo]]]]ttttaaaabbbblllleeee
  246.           [Disable] or enable dumping an ascii map of translations made by
  247.           _p_i_x_i_e into the file <myprog>.table where <myprog> is the name of the
  248.           original object.
  249.           Default:  ----nnnnoooottttaaaabbbblllleeee
  250.  
  251.      ----[[[[nnnnoooo]]]]ccccaaaallllllll____ccccoooouuuunnnnttttssss
  252.           [Disable] or enable collecting function invocation counts. This is
  253.           used in conjunction with _p_r_o_f -_g_p_r_o_f.
  254.           Default:  ----ccccaaaallllllll____ccccoooouuuunnnnttttssss
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. PPPPIIIIXXXXIIIIEEEE((((1111))))                                                              PPPPIIIIXXXXIIIIEEEE((((1111))))
  269.  
  270.  
  271.  
  272.      ----tttthhhhrrrreeeeeeeewwwwaaaayyyy _h_e_x _n_u_m_b_e_r
  273.           Tell _p_i_x_i_e not to transform code around threeway transfers.  Such
  274.           code lies in libgl.so and exists only on machines which have VGX,GTX
  275.           and Reality Engine graphics boards. The number for the Reality
  276.           Engine is 0x3000 and the number for VGX and GTX is 0x6000.
  277.           Most applications are not affected by this, so it is recommended
  278.           this option not be used unless the graphics are obviously behaving
  279.           differently from the non-instrumented version.  The erroneous
  280.           behavior most common is for the graphics to be completely black.
  281.           Since _p_i_x_i_e currently uses a heuristic to find the threeway patterns
  282.           it can be fooled into thinking it has found a threeway transfer when
  283.           in fact it has not. Because of this, _p_i_x_i_e does not pass the
  284.           -_t_h_r_e_e_w_a_y flag automatically to the shared object and the user must
  285.           run _p_i_x_i_e separately on libgl.so when using -_t_h_r_e_e_w_a_y.
  286.           Default: nnnnoooo tttthhhhrrrreeeeeeeewwwwaaaayyyy ssssuuuuppppppppoooorrrrtttt
  287.  
  288.      ----mmmmiiiippppssss1111
  289.           Use the MIPS1 instruction set (R2000, R3000) for output executable.
  290.           This option is only useful for translating a mips2 executable into a
  291.           mips1 executable. If the executable is mips3 or greater it will have
  292.           no affect.
  293.           Default: the architecture of the input executable will be
  294.           maintained.
  295.  
  296. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  297.      prof(1), ssrun(1), speedshop(1)
  298.  
  299. NNNNOOOOTTTTEEEESSSS
  300.      Some programs, e.g., _u_n_c_o_m_p_r_e_s_s and _v_i, will treat their arguments
  301.      differently when the name of the program is different.  If you are
  302.      running the program manually, you may need to rename _m_y_p_r_o_g._p_i_x_i_e to
  303.      _m_y_p_r_o_g for example.  If you are running the program with _s_s_r_u_n, the
  304.      program will think it was invoked with the original name.
  305.  
  306.      When _p_i_x_i_e reports the size of the old and new code, the numbers are
  307.      accurate in that the new code size reported is the size of the code _p_i_x_i_e
  308.      will actually execute.  However, the new code size does not count read-
  309.      only data (including a copy of the original text and another data block
  310.      the same size as the original text) put into the text section.
  311.  
  312.      _s_i_z_e(1) on the _p_i_x_i_e output reports a much larger text size than _p_i_x_i_e,
  313.      since _s_i_z_e counts everything in the text segment as text.
  314.  
  315.      Code instrumented by _p_i_x_i_e is substantially larger than the original
  316.      code. Conditional branches that used to fit in the 16-bit branch
  317.      displacement field are specially handled and normally do not generate a
  318.      _p_i_x_i_e error.  In certain cases in which they cannot be handled, a warning
  319.      may be generated.
  320.  
  321.      _p_i_x_i_e(1) currently cannot handle stripped programs.  _p_i_x_i_e will give a
  322.      fatal error if it is invoked on a stripped executable.
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. PPPPIIIIXXXXIIIIEEEE((((1111))))                                                              PPPPIIIIXXXXIIIIEEEE((((1111))))
  335.  
  336.  
  337.  
  338.      _p_i_x_i_e(1) sets the PIXIE_INIT bit of the processor-specific flags in the
  339.      ELF .dynamic section.  This guarantees the pixie-inserted initialization
  340.      code of a dynamic shared libraries is executed before any other init
  341.      code.  See _l_d(1).
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.